<?php


namespace Xiaoguai\DesignPattern\DP011\Subject;


use Xiaoguai\DesignPattern\DP011\SubjectInterface;

class ProxySubject implements SubjectInterface
{
    /**
     * @var SubjectInterface $subject
     */
    protected $subject;

    public function __construct()
    {
        $this->subject = new Subject();
    }

    public function request()
    {
        // do something before request() method.

        return $this->subject->request();
    }
}